package com.itheima.demo;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;

public class IODemo1 {
    public static void main(String[] args) throws IOException {
        File file = new File("DAY12_IO\\Test.txt");
        FileWriter fileWriter = new FileWriter(file);
        fileWriter.write("    静夜思 -  李白\r\n床前明月光,疑是地上霜.\n举头望明月,低头思故乡.");

        //fileWriter.close();
        fileWriter.flush();
        //关闭流之前会执行一次刷新操作;
        fileWriter.close();

    }
}
